package cn.com.server.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.github.pagehelper.Page;

import cn.com.server.entity.Resource;
import cn.com.server.entity.Role;
import cn.com.server.extend.view.MenuView;
import cn.com.server.extend.model.ResourceModel;
import cn.com.server.extend.view.ResourceView;

/**
 * <p>
  * 资源表 Mapper 接口
 * </p>
 *
 * @author qing
 * @since 2017-11-20
 */
public interface ResourceDao{
	
	public int update(Resource entity);
	
	public List<Resource> selectByRoleList(List<Role> roles);
	
	public List<MenuView> selectByMenuList(@Param("list")List<Role> roles,@Param("parentId") Long parentId,@Param("type") Integer type);
	
	public Page<Resource> selectResourceList(ResourceModel model);
	
	public List<ResourceView> selectResourceViewTree(@Param("parentId")Long parentId,@Param("status")Integer status,@Param("roleId") Long roleId);

}